package com.csht.service.Impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.csht.mapper.CshtThreeMenuMapper;
import com.csht.model.CshtThreeMenu;
import com.csht.service.CshtThreeMenuService;
import com.csht.vo.goods.ThreeMenuVo;

/**
 * 三级菜单service接口
 * @author chenhuiyan
 *
 */
@Service
public class CshtThreeMenuServicerImpl implements CshtThreeMenuService {
	
	@Autowired
	private CshtThreeMenuMapper cshtThreeMenuMapper;

	/**
	 * 查询三级菜单
	 */
	@Override
	public List<CshtThreeMenu> getThreeMenu(Integer twoMenuId) throws Exception {
		List<CshtThreeMenu> cshtThreeMenuList = cshtThreeMenuMapper.getThreeMenu(twoMenuId);
		return cshtThreeMenuList;
	}

	/**
	 * 根据三级菜单id查找三级菜单
	 */
	@Override
	public CshtThreeMenu getThreeMenuById(Integer threeMenuId) throws Exception {
		CshtThreeMenu cshtThreeMenu = cshtThreeMenuMapper.getThreeMenuById(threeMenuId);
		return cshtThreeMenu;
	}

	/**
	 * 模糊搜索三级菜单
	 */
	@Override
	public List<ThreeMenuVo> getMenuToSearch(String threeMenuName) throws Exception {
		List<ThreeMenuVo> threeMenuVoList = cshtThreeMenuMapper.getMenuToSearch(threeMenuName);
		return threeMenuVoList;
	}

}
